import config from '../../utils/config';
import apiCreator from '../../utils/apiCreator';

const api = apiCreator();

export default {
  // 获取风险分解
  getRisk: {
    Barra: (query) => api.get(`${config.interfaces.type3}barra/riskDecomposition/`, query),
  },
  // 获取超额风险趋势
  getExcessTrend: {
    Barra: (query) => api.get(`${config.interfaces.type3}barra/riskTrends/`, query),
  },
  //获取因子风险趋势图
  getFactorRiskTrend: (query) => api.get(`${config.interfaces.type3}barra/factorRiskTimeSeries/`, query),
  // 获取因子风险贡献表格
  getFactorContributionDetail: (query) => api.get(`${config.interfaces.type3}barra/riskFactorContributeDetails/`, query),
  // 获取产品指定时间范围期初期末时间
  queryProductTime: (query) => api.get(`${config.interfaces.type3}portfolio/getBeginEndTime/`, query),
};
